// wigets/business/goods-base-info/goods-base-info.js
const componentBehavior = require('../../../js/common/ComponentBehavior')
Component({
    behaviors: [componentBehavior],
    /**
     * 组件的属性列表
     */
    properties: {
        swiperImg: {
            type: Array,
            value: ['/test/1/68/20220715/a30f95446e37417793b3bd8271ae1d51.jpg', '/test/1/68/20220715/7fe63f5a524a40738b6aaf82727835fe.jpg']
        },
        pics: {
            type: Array,
            value: []
        },
        goodsIndex: {
            type: Number,
            value: 0
        },
        productVideo: {
            type: Object,
            value: {}
        },
        indicatorDots: {
            type: Boolean,
            value: true
        },
        vertical: {
            type: Boolean,
            value: false
        },
        circular: {
            type: Boolean,
            value: true
        },
        autoplay: {
            type: Boolean,
            value: true
        },
        /**缩略图宽 */
        thumbWidth: {
            type: Number,
            value: 0
        },
        /**缩略图高 */
        thumbHeight: {
            type: Number,
            value: 0
        },
        /**是否开启oss */
        enableOss: {
            type: Boolean,
            value: false
        },
        imgheights: {
            type: Array,
            value: []
        },
        imgwidth: {
            type: Number,
            value: 750
        },
        current: {
            type: Number,
            value: 0
        },
        imgDomain: {
            type: String,
            value: ''
        },
        proprietorWaterMark: {
            type: String,
            value: ''
        },
        fitHeight: {
            type: Number,
            value: 0
        },
        productData: {
            type: Object,
            value: {}
        },
        isLogin: {
            type: Boolean,
            value: false
        },
        NoLoginShowPrice: {
            type: Boolean,
            value: false
        },
        ShowPrice: {
            type: Number,
            value: 0
        },
        pagetype: {
            type: Number,
            value: 0
        },
        isPanic: {
            type: Number,
            value: 0
        },
        goodsIndex: {
            type: Number,
            value: 0
        },
        MinPaicPrice: {
            type: String,
            value: ''
        },
        priceDigits: {
            type: String,
            value: ""
        },
        goodsIndex: {
            type: Number,
            value: 0
        },
        Currency: {
            type: String,
            value: '¥'
        },
        productDisplayTags: {
            type: Array,
            value: []
        },
        FieldDisplayName: {
            type: Array,
            value: []
        },
        couponImg: {
            type: String,
            value: ""
        },
        couponImg: {
            type: Object,
            value: {}
        },
        IntroDisplayField: {
            type: Object,
            value: {}
        },
        goodsData: {
            type: Object,
            value: {}
        },
        editionInfo: {
            type: Object,
            value: {}
        },
        IntroDisplayField: {
            type: Object,
            value: {}
        },
        showRetailPrice: {
            type: String,
            value: ""
        },
        showProductSells: {
            type: String,
            value: ""
        },
        ShowVendorName: {
            type: String,
            value: ""
        },
        couponImg: {
            type: String,
            value: ""
        },
        goodSpecific: {
            type: Array,
            value: []
        },
        showPanicTime: {
            type: String,
            value: ""
        },
        pagetype: {
            type: String,
            value: ""
        },
        c1: {
            type: Number,
            value: 0
        },
        c2: {
            type: Number,
            value: 0
        },
        c3: {
            type: Number,
            value: 0
        },
        c4: {
            type: Number,
            value: 0
        },
        isStart: {
            type: Number,
            value: 1
        },
        styleType: {
            type: String,
            value: "1"
        }
    },

    /**
     * 组件的初始数据
     */
    data: {
        swiperCurrent:1
    },
    lifetimes: {
        attached() {
            console.log('子组件加载--------', this.properties.productData)
        }
    },
    /**
     * 组件的方法列表
     */
    methods: {
        handleShare() {
            this.triggerEvent('showShare')
        },
        handleCurrent(e){
            this.setData({
                swiperCurrent:e.detail+1
            })
        }
    }
})